initObject = function(obj, props) {
	var i;

	for (i in props) {
		if (props[i] === null) obj[i] = null;
		else if (typeof props[i] === 'function') continue;
		else if (typeof props[i] !== 'object') obj[i] = props[i];
		else if (props[i] instanceof Array) obj[i] = initObject([], props[i]);
		else obj[i] = initObject({}, props[i]);
	}

	return obj;
}

function Skiniko() {
}

var skiniko = new Skiniko();
var skiniko2 = new Skiniko();

skiniko = initObject(skiniko, {
	"pektis": "panos",
	"id": {
		"a": 1,
		"b": 2,
		"c": 3,
	},
});

skiniko2 = initObject(skiniko2, {
	"pektis": "panos",
	"id": {
		"a": 1,
		"b": 2,
		"c": 3,
	},
});

function compare(a, b) {
	var i;
		for(i in a) {		
			if (a[i] == b[i]) console.log("a[i] = " + a[i] + " == " + b[i]);
			else if (a[i] === 'object') compare(a[i], b[i]);
			else if (a[i] instanceof Array) compare(a[i], b[i]);

		}
/*
	for(i in a) {
		if(a[i] == b[i]) {
			console.log("i = " + i + " a[i] = " +a[i]);
		}
		else {
			console.log("a[i] = " +a[i] + ", b[i] = " + b[i]);
		}
	}
*/
}

compare(skiniko, skiniko2);

//console.log(skiniko == skiniko2);

